/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pku.lbs.core;

import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.PropertiesConfiguration;

/**
 *
 * @author yongchao
 */
public class Constants {

    public static void init(String file) throws ConfigurationException {
        Configuration config = new PropertiesConfiguration( file );

        // INITIALIZE PARAMETERS
        VERSION = config.getDouble("VERSION", 1.0);
        UPLOAD_DIR = config.getString("UPLOAD_DIR", "./photo/");
        UPLOAD_MAXSIZE = config.getDouble("UPLOAD_MAXSIZE", 100);
    }

    public static double VERSION;
    public static String UPLOAD_DIR;
    public static double UPLOAD_MAXSIZE;
}
